/*
 * Copyright (C) 2005-present, 58.com.  All rights reserved.
 * 
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.swak.paxos.breakpoint;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * learner断点日志跟踪
 */
public class LearnerBP {

	private static final Logger logger = LoggerFactory.getLogger(LearnerBP.class);

	public static void onProposed(int groupId, long instanceID) {
		if (!logger.isDebugEnabled()) {
			return;
		}
		logger.debug("LearnerBP onProposed, groupId {}, instanceID {}.", groupId, instanceID);
	}

	public static void onProposedNotAcceptYet(int groupId, long instanceID) {
		if (!logger.isDebugEnabled()) {
			return;
		}
		logger.debug("LearnerBP onProposedNotAcceptYet, groupId {}, instanceID {}. ", groupId, instanceID);
	}

	public static void onProposedBallotNotSame(int groupId, long instanceID) {
		if (!logger.isDebugEnabled()) {
			return;
		}
		logger.debug("LearnerBP onProposedBallotNotSame, groupId {}, instanceID {}.", groupId, instanceID);
	}

	public static void onProposedSuccessLearn(int groupId, long instanceID) {
		if (!logger.isDebugEnabled()) {
			return;
		}
		logger.debug("LearnerBP onProposedSuccessLearn, groupId {}, instanceID {}.", groupId, instanceID);
	}

	public static void askforLearn(int groupId) {
		if (!logger.isDebugEnabled()) {
			return;
		}
		logger.debug("LearnerBP askforLearn, groupId: {}.", groupId);
	}

	public static void onAskforLearn(int groupId) {
		if (!logger.isDebugEnabled()) {
			return;
		}
		logger.debug("LearnerBP onAskforLearn, groupId: {}.", groupId);
	}

	public static void onAskforLearnGetLockFail(int groupId) {
		if (!logger.isDebugEnabled()) {
			return;
		}
		logger.debug("LearnerBP onAskforLearnGetLockFail, groupId: {}.", groupId);
	}

	public static void sendNowInstanceID(int groupId) {
		if (!logger.isDebugEnabled()) {
			return;
		}
		logger.debug("LearnerBP sendNowInstanceID, groupId: {}.", groupId);
	}

	public static void onSendNowInstanceID(int groupId) {
		if (!logger.isDebugEnabled()) {
			return;
		}
		logger.debug("LearnerBP onSendNowInstanceID, groupId: {}.", groupId);
	}

	public static void comfirmAskForLearn(int groupId) {
		if (!logger.isDebugEnabled()) {
			return;
		}
		logger.debug("LearnerBP comfirmAskForLearn, groupId: {}.", groupId);
	}

	public static void onComfirmAskForLearn(int groupId) {
		if (!logger.isDebugEnabled()) {
			return;
		}
		logger.debug("LearnerBP onComfirmAskForLearn, groupId: {}.", groupId);
	}

	public static void onComfirmAskForLearnGetLockFail(int groupId) {
		if (!logger.isDebugEnabled()) {
			return;
		}
		logger.debug("LearnerBP onComfirmAskForLearnGetLockFail, groupId: {}.", groupId);
	}

	public static void sendLearnValue(int groupId) {
		if (!logger.isDebugEnabled()) {
			return;
		}
		logger.debug("LearnerBP sendLearnValue, groupId: {}.", groupId);
	}

	public static void onSendLearnValue(int groupId) {
		if (!logger.isDebugEnabled()) {
			return;
		}
		logger.debug("LearnerBP onSendLearnValue, groupId: " + groupId);
	}

	public static void sendLearnValueAck(int groupId) {
		if (!logger.isDebugEnabled()) {
			return;
		}
		logger.debug("LearnerBP sendLearnValueAck, groupId: " + groupId);
	}

	public static void onSendLearnValueAck(int groupId) {
		if (!logger.isDebugEnabled()) {
			return;
		}
		logger.debug("LearnerBP onSendLearnValueAck, groupId: " + groupId);
	}

	public static void senderAckTimeout(int groupId) {
		if (!logger.isDebugEnabled()) {
			return;
		}
		logger.debug("LearnerBP senderAckTimeout, groupId: " + groupId);
	}

	public static void senderAckDelay(int groupId) {
		if (!logger.isDebugEnabled()) {
			return;
		}
		logger.debug("LearnerBP senderAckDelay, groupId: " + groupId);
	}

	public static void senderSendOnePaxosLog(int groupId) {
		if (!logger.isDebugEnabled()) {
			return;
		}
		logger.debug("LearnerBP senderSendOnePaxosLog, groupId: " + groupId);
	}

}
